package com.lanswon.qzsmk.model;

import java.io.Serializable;

public class RolePrivilege implements Serializable {
    /** 权限ID */
    private Integer privilegeId;

    /** 系统ID */
    private Integer sysId;

    /** 角色ID */
    private Integer roleId;


    /**
	 * @param privilegeId
	 * @param sysId
	 * @param roleId
	 */
	public RolePrivilege(Integer privilegeId, Integer sysId, Integer roleId) {
		super();
		this.privilegeId = privilegeId;
		this.sysId = sysId;
		this.roleId = roleId;
	}

	public Integer getPrivilegeId() {
        return privilegeId;
    }

    public void setPrivilegeId(Integer privilegeId) {
        this.privilegeId = privilegeId;
    }

    public Integer getSysId() {
        return sysId;
    }

    public void setSysId(Integer sysId) {
        this.sysId = sysId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", privilegeId=").append(privilegeId);
        sb.append(", sysId=").append(sysId);
        sb.append(", roleId=").append(roleId);
        sb.append("]");
        return sb.toString();
    }
    
    public RolePrivilege(){
    	
    }
    public RolePrivilege(String sysId,String roleId,String privilegeId){
    	this.privilegeId=Integer.valueOf(privilegeId);
    	this.sysId=Integer.valueOf(sysId);
    	this.roleId=Integer.valueOf(roleId);
    }
    
    @Override  
    public boolean equals(Object obj){  
        if(obj == null){  
            return false;  
        }else {           
                if(this.getClass() == obj.getClass()){  
                	RolePrivilege u = (RolePrivilege) obj;  
                    if(this.privilegeId ==u.getPrivilegeId() && this.roleId == u.getRoleId() && this.sysId == u.getSysId() ){  
                        return true;  
                    }else{  
                        return false;  
                    }  
                  
            }else{  
                return false;  
            }  
        }             
    }  
}